package com.polaris.live.dialog

import android.content.Context
import com.blankj.utilcode.util.StringUtils
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.common.ext.setOnSingleClickListener
import com.polaris.live.databinding.DialogRechargeActSuccessBinding
import com.polaris.live.resp.back_resp.PayerRechargeDailyRewardsInfoVo
import com.polaris.live.translation.R.string

/**
 * 充值特惠弹窗充值成功
 *
 * @author Created by 半仙 on 2024/7/29/029 19:20
 */
class RechargeActSuccessDialog(
    context: Context,
    private val coin: Long,
    private val dailyRewardsInfoVo: List<PayerRechargeDailyRewardsInfoVo>,
) : CenterPopupView(context) {

    override fun getImplLayoutId() = R.layout.dialog_recharge_act_success

    private lateinit var mBinding: DialogRechargeActSuccessBinding

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogRechargeActSuccessBinding.bind(popupImplView)
        mBinding.shapeTvAllNum.text = "$coin${StringUtils.getString(string.diamond_string)}"
        mBinding.shapeTvDetail.text = StringUtils.getString(string.you_can_still_get, dailyRewardsInfoVo.size)
        mBinding.shapeTvOk.setOnSingleClickListener {
            dismiss()
        }
        mBinding.shapeTvTitle.text = StringUtils.getString(string.congratulations_for_you)
    }

}